import cv2
import numpy as np
img=cv2.imread(r"D:\Project\Project37\Project37\tupian\456.png")
gray=cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
ret,dst=cv2.threshold(gray,188,255,cv2.THRESH_BINARY)
dst2=cv2.adaptiveThreshold(gray,255,cv2.ADAPTIVE_THRESH_GAUSSIAN_C,cv2.THRESH_BINARY,3,0)
cv2.imshow('img',img)
cv2.imshow('dst',dst)
cv2.imshow('dst2',dst2)
cv2.waitKey(0)
cv2.destroyAllWindows()